<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book 我的电子书 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>media媒体查询 | 我的电子书</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.9">
        <meta name="author" content="Melon">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-image-captions/image-captions.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/02css/position.html" />
    
    
    <link rel="prev" href="../../md/02css/float.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="2.6"
        data-chapter-title="media媒体查询"
        data-filepath="md/02css/media.md"
        data-basepath="../.."
        data-revision="Mon Jun 08 2020 19:44:34 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/01html/01label.html">
            
                
                    <a href="../../md/01html/01label.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML标签
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/01html/boxmodel.html">
            
                
                    <a href="../../md/01html/boxmodel.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/01html/nvmgitbook.html">
            
                
                    <a href="../../md/01html/nvmgitbook.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        nvm和gitbook
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/02css/index.html">
            
                
                    <a href="../../md/02css/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        css
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/02css/01selector.html">
            
                
                    <a href="../../md/02css/01selector.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/02css/element_center.html">
            
                
                    <a href="../../md/02css/element_center.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        元素垂直居中的方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="md/02css/Interview.html">
            
                
                    <a href="../../md/02css/Interview.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        面试题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="md/02css/displayvisibility.html">
            
                
                    <a href="../../md/02css/displayvisibility.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        元素的显示模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="md/02css/float.html">
            
                
                    <a href="../../md/02css/float.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.6" data-path="md/02css/media.html">
            
                
                    <a href="../../md/02css/media.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        media媒体查询
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="md/02css/position.html">
            
                
                    <a href="../../md/02css/position.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="md/02css/textoverflow.html">
            
                
                    <a href="../../md/02css/textoverflow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        文本溢出处理
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >我的电子书</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="media&#x5A92;&#x4F53;&#x67E5;&#x8BE2;">media&#x5A92;&#x4F53;&#x67E5;&#x8BE2;</h1>
<h4 id="&#x6982;&#x5FF5;&#xFF1A;&#x4F7F;&#x7528;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x9488;&#x5BF9;&#x4E0D;&#x540C;&#x7C7B;&#x578B;&#x7684;&#x5A92;&#x4F53;&#x53BB;&#x8BBE;&#x7F6E;&#x4E0D;&#x540C;&#x7684;&#x6837;&#x5F0F;&#x3002;">&#x6982;&#x5FF5;&#xFF1A;&#x4F7F;&#x7528;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x9488;&#x5BF9;&#x4E0D;&#x540C;&#x7C7B;&#x578B;&#x7684;&#x5A92;&#x4F53;&#x53BB;&#x8BBE;&#x7F6E;&#x4E0D;&#x540C;&#x7684;&#x6837;&#x5F0F;&#x3002;</h4>
<h4 id="&#x7528;&#x6CD5;&#xFF1A;&#x8FD9;&#x4E9B;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#x7684;&#x6837;&#x5F0F;&#xFF0C;&#x6211;&#x4EEC;&#x901A;&#x5E38;&#x4F1A;&#x5199;&#x5728;&#x6700;&#x540E;&#xFF0C;style&#x7ED3;&#x675F;&#x6807;&#x7B7E;&#x4E4B;&#x524D;&#xFF0C;&#x9632;&#x6B62;&#x540E;&#x9762;&#x7684;&#x6837;&#x5F0F;&#x590D;&#x5199;&#x4E86;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#x7684;&#x6837;&#x5F0F;&#xFF0C;&#x4F7F;&#x5F97;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#x5931;&#x6548;&#x3002;">&#x7528;&#x6CD5;&#xFF1A;&#x8FD9;&#x4E9B;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#x7684;&#x6837;&#x5F0F;&#xFF0C;&#x6211;&#x4EEC;&#x901A;&#x5E38;&#x4F1A;&#x5199;&#x5728;&#x6700;&#x540E;&#xFF0C;<code>style</code>&#x7ED3;&#x675F;&#x6807;&#x7B7E;&#x4E4B;&#x524D;&#xFF0C;&#x9632;&#x6B62;&#x540E;&#x9762;&#x7684;&#x6837;&#x5F0F;&#x590D;&#x5199;&#x4E86;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#x7684;&#x6837;&#x5F0F;&#xFF0C;&#x4F7F;&#x5F97;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#x5931;&#x6548;&#x3002;</h4>
<h4 id="midia&#x8BED;&#x6CD5;">midia&#x8BED;&#x6CD5;</h4>
<pre><code class="lang-css">@media ; mediatype ; and/not/only ; (miediafeature){
css-code
}
</code></pre>
<ul>
<li><p><code>midiatype</code> &#x662F;&#x5A92;&#x4F53;&#x7C7B;&#x578B;</p>
<ul>
<li><code>print</code>(&#x6253;&#x5370;&#x673A;&#x8BBE;&#x5907;)</li>
<li><code>screen</code>(&#x62E5;&#x6709;&#x7535;&#x8111;&#x5C4F;&#x5E55;&#xFF0C;&#x5E73;&#x677F;&#x7535;&#x8111;&#xFF0C;&#x667A;&#x80FD;&#x624B;&#x673A;)</li>
<li><code>speech</code>(&#x5E94;&#x7528;&#x4E8E;&#x5C4F;&#x5E55;&#x9605;&#x8BFB;&#x5668;)</li>
</ul>
</li>
<li><p>&#x6761;&#x4EF6;&#x903B;&#x8F91;&#x8BED;&#x6CD5;</p>
<ul>
<li><code>not</code> &#x975E;&#xFF0C;&#x4E0D; </li>
<li><code>only</code> &#x4EC5;&#x4EC5; </li>
<li><code>and</code> &#x548C;</li>
</ul>
</li>
<li><p><code>midiafeature</code></p>
<ul>
<li>&#x7528;&#x6765;&#x89C4;&#x5B9A;&#x6700;&#x5927;&#x6216;&#x6700;&#x5C0F;&#x7684;&#x5BBD;&#x5EA6;</li>
</ul>
</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/02css/float.html" class="navigation navigation-prev " aria-label="Previous page: 浮动"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/02css/position.html" class="navigation navigation-next " aria-label="Next page: 定位"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"image-captions":{"attributes":{"style":"left: 50%;position: relative;transform: translateX(-50%);"},"caption":"图 _PAGE_LEVEL_._PAGE_IMAGE_NUMBER_ - _CAPTION_","align":"center","variable_name":"_pictures"},"fontsettings":{"theme":"night","family":"sans","size":2},"toggle-chapters":{},"highlight":{}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book 我的电子书 -->
</html>
